package com.tourism.dao;

import com.tourism.entity.Ticket;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description 门票
 * @Author z
 * @Date 2021-04-25 8:54
 */
@Mapper
public interface TicketDao {
    /**
     * 新增门票
     *
     * @return
     */
    boolean addTicket(Ticket ticket);
    /**
     * 修改门票
     *
     * @return
     */
    boolean updateTicket(Ticket ticket);

    /**
     * 模糊搜索门票
     *
     * @param name
     * @param attractionId
     * @return
     */
    List<Ticket> getAllTicket(@Param("name") String name, @Param("attractionId") Long attractionId);


    /**
     * 根据id查询门票信息
     *
     * @param id
     * @return
     */
    Ticket getTicketById(Long id);

    /**
     * 根据id删除门票信息
     *
     * @param id
     * @return
     */
    Boolean deleteTicketById(Long id);
}
